package cn.yfxu.server.util;

import cn.yfxu.server.pojo.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
* @author Xxxxyf
* @date 2021/3/10
* @desc 操作员工具类
*/
public class AdminUtils {
     public static Admin getCurrentAdmin(){
         return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
     }
}
